package org.PaperBase
{
	public class EventManager
	{
		private var Listener:Array;
		
		public function EventManager()
		{
			this.Listener = new Array();
		}
		
		public function setListener(obj:Object,callback:Function):void{
			this.Listener.push([obj,callback]);
		}
		
		public function removeListener(obj:Object,callback:Function):void{
			this.Listener.splice(this.Listener.indexOf([obj,callback]),1);
		}
		
		public function informListener():void{
			for each(var item:Array in this.Listener){
				var obj:Object = item[0];
				var callback:Function = item[1];
				callback.apply(obj);	
			}
		}
	}
}
